import { defineStore } from "pinia";

//defineStore第一个参数:唯一的,不能重复
export const userStore = defineStore("userStore", {
  state: () => {
    return {
      userId: "",
      nickName: "",
    };
  },
  getters: {
    getUserId(state) {
      return state.userId;
    },
  },
  actions: {
    setUserId(count: string) {
      this.userId = count;
    },
  },
});
